package top.hcode.hoj.utils;

import top.hcode.hoj.pojo.entity.coll.CollQuestion;
import top.hcode.hoj.pojo.vo.coll.CollQuestionVO;

/**
 * @author orangej
 * @since 2025/2/19
 */
public class ConvertUtil {

    /**
     * 将 CollQuestion 转换成 CollQuestionVO
     * 未查询选项信息
     */
    public static CollQuestionVO toQuestionVO(CollQuestion question) {
        CollQuestionVO vo = new CollQuestionVO();
        vo.setId(question.getId());
        vo.setCollId(question.getCollId());
        vo.setTitle(question.getTitle());
        vo.setScore(question.getScore());
        vo.setQuestionType(question.getQuestionType());
        vo.setSortOrder(question.getSortOrder());
        vo.setGmtCreate(question.getGmtCreate());
        vo.setGmtModified(question.getGmtModified());

        return vo;
    }
}
